	const SYSTEM_INFO =uni.getSystemInfoSync();
	export const getStatusBarHeight = ()=> SYSTEM_INFO.statusBarHeight || 15;
	
	
	export const getTitleBarHeight = ()=>{
		/* 如果有小程序的胶囊按钮就直接获取胶囊高度,没有的话就给固定高度 */
	if(uni.getMenuButtonBoundingClientRect){
		let {top,height} = uni.getMenuButtonBoundingClientRect();
		/* 直接给出计算后的高度 */
		return height + (top - getStatusBarHeight())*2 ;
		}else{
			/* 非微信小程序给出的高度. */
			return 40;
			
		}
	}	
	
	export const getNavBarHeight =() => getStatusBarHeight()+getTitleBarHeight();
	
	
	